package com.sherler.turtle;

import java.util.Date;

/**
 * Created by GeorgeSherler on 2017/4/5.
 */
public class TurtleAlgo {
    public static void proceedure(Date date,double highT,double lowT, double openT, double closeT){
        double trueRange= tripleMax(highT-lowT,Math.abs(highT-closeT),Math.abs(closeT-lowT));
        double NT=trueRange;
        if(trueRange>19){
            NT=(trueRange)/20;
        }
    }



    /**
     * 比较三元组中的最大值
     * @return
     */
    private static double tripleMax(double a,double b,double c){
        if(a>=b&&a>=c){
            return a;
        }else if(b>=a&&b>=c){
            return b;
        }else {
            return c;
        }
    }
}
